package com.gt.platform.domain;

import lombok.Data;

/**
 * @author caidesheng
 * @since 2022-09-05
 */
@Data
public class ResponseInfo {

    //来源
    private String source = "NJ";
    //记录流水号
    private String recordFlow;
    //交易码
    private String transNo;
    //返回码
    private String retCode;
    //返回类型
    private String retType;
    //返回信息
    private String retCont;

    public ResponseInfo(String recordFlow, String transNo, String retCode, String retType, String retCont) {
        this.recordFlow = recordFlow;
        this.transNo = transNo;
        this.retCode = retCode;
        this.retType = retType;
        this.retCont = retCont;
    }

    public String ResponseInfoXml(){
        return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                "<Response>\n" +
                "    <Head>\n" +
                "        <Return>\n" +
                "            <Source>"+this.getSource()+"</Source>\n" +
                "            <RecordFlow>"+this.getRecordFlow()+"</RecordFlow>\n" +
                "            <TransNo>"+this.getTransNo()+"</TransNo>\n" +
                "            <RetCode>"+this.getRetCode()+"</RetCode>\n" +
                "            <RetType>"+this.getRetType()+"</RetType>\n" +
                "            <RetCont>"+this.getRetCont()+"</RetCont>\n" +
                "        </Return>\n" +
                "    </Head>\n" +
                "    <Body>\n" +
                "    </Body>\n" +
                "</Response>";
    }
}
